<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>List of Wallpaper</title>
</head>
<body>
<f:view>                                       
	<h:form>
	<h:commandButton value="Logout" action="#{loginBean.logout}"></h:commandButton><br></br>
	<h:commandButton value="AdminView" disabled="#{loginBean.checkAdmin}" action="#{loginBean.adminview}"></h:commandButton><br></br>
	eingeloggt als: <h:outputText value="#{loginBean.name}" /><br></br>
	<h:commandButton value="Profil bearbeiten" action="#{loginBean.editProfile}"></h:commandButton><br></br>
	</h:form>
	<br></br><h1>Liste der Wallpaper</h1>
	<h:form id="link">
	<h1><h:outputText value="#{wallpaperBean.wallpaper.title}" /></h1>
	<h:dataTable var="wallpaperList" value="#{wallpaperBean.wallpaperList}">
  	<h:column>
    	<h:outputText value="#{wallpaperList.wallpaperid}"/>
  	</h:column>
  	<h:column>
    	<h:commandLink value="#{wallpaperList.title}" action="#{wallpaperBean.show}">
    	<f:param name="wallpaperid" value="#{wallpaperList.wallpaperid}" />
    	</h:commandLink>
  	</h:column>
  	<h:column>
    	<h:outputText value="#{wallpaperList.author}"/>
  	</h:column>
  	<h:column>
    	<h:outputText value="#{wallpaperList.creationdate}"/>
  	</h:column>
	</h:dataTable>
  	</h:form>
</f:view>
<br/><br/>
 <a href="../jsp/uploadWallpaper.jsp">Wallpaper hochladen</a>
</body>
</html>